﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Mail;
using System.Collections.Specialized;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using Studio.Network.Mail;

////////////
/// 
/// The same to System.Net.Mail.SmtpStatusCode
/// 
/// By marstone@marstone.net, 2008/12/02
/// 
////////////
namespace Studio.Network.MailServer
{

    // Summary:
    //     Specifies the outcome of sending e-mail by using the System.Net.Mail.SmtpClient
    //     class.
    public enum SmtpStatus
    {
        // Summary:
        //     The transaction could not occur. You receive this error when the specified
        //     SMTP host cannot be found.
        GeneralFailure = -1,
        //
        // Summary:
        //     A system status or system Help reply.
        SystemStatus = 211,
        //
        // Summary:
        //     A Help message was returned by the service.
        HelpMessage = 214,
        //
        // Summary:
        //     The SMTP service is ready.
        ServiceReady = 220,
        //
        // Summary:
        //     The SMTP service is closing the transmission channel.
        ServiceClosingTransmissionChannel = 221,
        //
        // Summary:
        //     The email was successfully sent to the SMTP service.
        Ok = 250,
        //
        // Summary:
        //     The user mailbox is not located on the receiving server; the server forwards
        //     the e-mail.
        UserNotLocalWillForward = 251,
        //
        // Summary:
        //     The specified user is not local, but the receiving SMTP service accepted
        //     the message and attempted to deliver it. This status code is defined in RFC
        //     1123, which is available at http://www.ietf.orghttp://www.ietf.org/.
        CannotVerifyUserWillAttemptDelivery = 252,
        //
        // Summary:
        //     The SMTP service is ready to receive the e-mail content.
        StartMailInput = 354,
        //
        // Summary:
        //     The SMTP service is not available; the server is closing the transmission
        //     channel.
        ServiceNotAvailable = 421,
        //
        // Summary:
        //     The destination mailbox is in use.
        MailboxBusy = 450,
        //
        // Summary:
        //     The SMTP service cannot complete the request. This error can occur if the
        //     client's IP address cannot be resolved (that is, a reverse lookup failed).
        //     You can also receive this error if the client domain has been identified
        //     as an open relay or source for unsolicited e-mail (spam). For details, see
        //     RFC 2505, which is available at http://www.ietf.orghttp://www.ietf.org/.
        LocalErrorInProcessing = 451,
        //
        // Summary:
        //     The SMTP service does not have sufficient storage to complete the request.
        InsufficientStorage = 452,
        //
        // Summary:
        //     The client was not authenticated or is not allowed to send mail using the
        //     specified SMTP host.
        ClientNotPermitted = 454,
        //
        // Summary:
        //     The SMTP service does not recognize the specified command.
        CommandUnrecognized = 500,
        //
        // Summary:
        //     The syntax used to specify a command or parameter is incorrect.
        SyntaxError = 501,
        //
        // Summary:
        //     The SMTP service does not implement the specified command.
        CommandNotImplemented = 502,
        //
        // Summary:
        //     The commands were sent in the incorrect sequence.
        BadCommandSequence = 503,
        //
        // Summary:
        //     The SMTP service does not implement the specified command parameter.
        CommandParameterNotImplemented = 504,
        //
        // Summary:
        //     The SMTP server is configured to accept only TLS connections, and the SMTP
        //     client is attempting to connect by using a non-TLS connection. The solution
        //     is for the user to set EnableSsl=true on the SMTP Client.
        MustIssueStartTlsFirst = 530,
        //
        // Summary:
        //     The destination mailbox was not found or could not be accessed.
        MailboxUnavailable = 550,
        //
        // Summary:
        //     The user mailbox is not located on the receiving server. You should resend
        //     using the supplied address information.
        UserNotLocalTryAlternatePath = 551,
        //
        // Summary:
        //     The message is too large to be stored in the destination mailbox.
        ExceededStorageAllocation = 552,
        //
        // Summary:
        //     The syntax used to specify the destination mailbox is incorrect.
        MailboxNameNotAllowed = 553,
        //
        // Summary:
        //     The transaction failed.
        TransactionFailed = 554,
    }
}
